<?php
	function JsonCharFilter($jsonStr){
		//$jsonStr = str_replace("\\", "\\\\", $jsonStr);
		$jsonStr = str_replace("\b", "\\b", $jsonStr);
		$jsonStr = str_replace("\t", "\\t", $jsonStr);
		$jsonStr = str_replace("\n", "\\n", $jsonStr);
		$jsonStr = str_replace("\f", "\\f", $jsonStr);
		$jsonStr = str_replace("\r", "\\r", $jsonStr);
		//$jsonStr = str_replace("\"", "\\\"", $jsonStr);
		return $jsonStr;
	}
	
	
	//echo JsonCharFilter("\"");
	
	
	function replaceQuoteAndSlash($str){
		$str = str_replace("\\", "\\\\", $str);
		$str = str_replace("\"", "\\\"", $str);
		return $str;
		
	}
	
	
	
?>